package cn.stylefeng.guns.modular.system.controller;

import cn.stylefeng.guns.modular.system.exception.ProjectException;
import cn.stylefeng.guns.modular.system.utils.ResultVOUtil;
import cn.stylefeng.guns.modular.system.vo.ResultVO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class JrsfControllerAdvice {
 
    @ExceptionHandler(value = Exception.class)
    public ResultVO error(Exception ex){
        return ResultVOUtil.error(ex);
    }
 
 
    @ExceptionHandler(value = ProjectException.class)
    public ResultVO jrsfExceptionHandler(ProjectException ex){
        return ResultVOUtil.error(ex);
    }
}